package com.xrkj.b2c.controller.common;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.xrkj.b2c.service.message.ShortMessageService;

/**
 * 
 * <B>系统名称：</B><BR>
 * <B>模块名称：</B><BR>
 * <B>中文类名：</B>消息控制类<BR>
 * <B>概要说明：</B><BR>
 * 
 * @author （perry）
 * @since 2018年7月7日
 */
@RequestMapping("/message")
@Controller
public class MessageController extends BasicController {

    private Logger logger = Logger.getLogger(MessageController.class);

    @Resource
    protected ShortMessageService shortMessageService;//消息service

    /**
     * 
     * <B>方法名称：</B>发送分享短消息<BR>
     * <B>概要说明：</B><BR>
     * 
     * @author perry
     * @since 2017年9月7日
     * @param request
     * @param response
     * @return
     */
    @RequestMapping("/sendShareCompanyMessage")
    @ResponseBody
    public Map<String, Object> sendShareCompanyMessage(HttpServletRequest request, HttpServletResponse response) {
        Map<String, Object> ret = new HashMap<String, Object>();
        String mobile = request.getParameter("mobile");
        String shareContent = request.getParameter("shareContent");
        return shortMessageService.sendShareCompanyMessage(mobile, shareContent);
    }

}
